import request from '@/config/axios'

// 查询审批列表
export const getApprovalList = () => {
  return request.get({ url: '/system/node-config/page' })
}

// 查询所有用户列表
export const getAllUserList = () => {
  return request.get({ url: '/portalUser/get-all-list' })
}

// 更新审批节点配置人员
export const updateApprovalNodeConfig = (datas: any) => {
  return request.put({ url: '/system/node-config/update', data: datas })
}

// 查询所有部门
export const getAllDeptList = () => {
  return request.get({ url: '/portalDept/get-all-list' })
}

// 查询审批记录列表
export const getApprovalRecordList = (params: any) => {
  return request.get({ url: '/approval/applicationPage', params: params })
}

// 查询审批记录详情
export const getApprovalRecordDetail = (params: any) => {
  return request.get({ url: '/systemRecord/page', params: params })
}

// 日志
// 获取日志接口
export const getServiceLog = (params: any) => {
  return request.get({ url: '/system/record-query/getServiceLog', params: params })
}

// 操作服务启停接口
export const operationService = (params: any) => {
  return request.get({ url: '/system/record-query/operationService', params: params })
}

// 测试司机信息查询服务接口连通性
export const testDriverInfoConn = () => {
  return request.get({ url: '/system/record-query/testDriverInfoConn' })
}

// 测试车辆信息查询服务接口连通性
export const testVehicleInfoConn = () => {
  return request.get({ url: '/system/record-query/testVehicleInfoConn' })
}

// 测试运单信息查询服务接口连通性
export const testShippingNoteConn = () => {
  return request.get({ url: '/system/record-query/testShippingNoteConn' })
}

// 测试车辆送修信息查询服务接口连通性
export const testCarRepairInfoConn = () => {
  return request.get({ url: '/system/record-query/testCarRepairInfoConn' })
}

// 获取ETL转换状态接口
export const getETLStatus = () => {
  return request.get({ url: '/system/record-query/getEtlStatus' })
}
